<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-touch-fullscreen" content="yes">
<title>KISSY html Lexer</title>
</head>
<body>
<script src="/kissy/build/seed.js"></script>
<script src="/kissy/src/package.js"></script>
<script>


    KISSY.use("html-parser,core", function(S, HtmlParser) {
        var Lexer = HtmlParser.Lexer;
        //var html = "<div id='z\\''><<a> ";
        var html="<br/>";
        S.log("html:");
        S.log(html);
        var lexer = new Lexer(html),node;
        while (node = lexer.nextNode()) {
            S.log(node.toDebugString());
            if (node.nodeType == 1) {
                S.log("attribute length:" + (node.attributes.length));
            }
        }
    });
</script>
</body>
</html>